package test.instance {
	import flash.display.Sprite;
	
	import org.kisekiproject.classlibrary.IClassLibrary;
	import org.kisekiproject.classlibrary.LocalClassLibrary;
	import org.kisekiproject.evaluator.VariableStore;
	import org.kisekiproject.instance.ClassDefinitionLibrary;
	import org.kisekiproject.instance.DefinitionLibrary;
	import org.kisekiproject.instance.IDefinitionLibrary;
	import org.kisekiproject.instance.Instance;
	import org.kisekiproject.instance.InstanceFactory;
	import org.kisekiproject.resources.ResourceLoader;
	
	import test.instance.classes.TestClass;

	public class ClassLibraryInstanceTest extends Sprite {

		// Make sure it is linked.
		private var t:TestClass;

		public function ClassLibraryInstanceTest() {
			var classLib:IClassLibrary=new LocalClassLibrary();
			var definitions:IDefinitionLibrary=new ClassDefinitionLibrary(classLib);
			var resources:ResourceLoader=new ResourceLoader();
			var variables:VariableStore=new VariableStore();

			var factory:InstanceFactory=new InstanceFactory();
			factory.definitions=definitions;
			factory.resources=resources;
			factory.variables=variables;

			var x:XML=
				<node type="test.instance.classes.TestClass">
				</node>;

			var i:Instance=factory.createInstanceFromXML(x);
		}
	}
}